// 封装结算相关接口
import request from "@/utils/request";

// 创建订单
export const createOrderAPI = (orderInfo) => {
  console.log('发送创建订单请求:', orderInfo);
  return request({
    url: '/order/add',
    method: 'POST',
    data: orderInfo
  }).then(res => {
    console.log('创建订单响应:', res);
    return res;
  }).catch(err => {
    console.error('创建订单失败:', err);
    throw err;
  });
};